package com.culturalyard.mapper;

import com.culturalyard.handler.GeoPointTypeHandler;
import com.culturalyard.pojo.bean.GeoPoint;
import com.culturalyard.pojo.entity.Yard;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface YardMapper {
    /**
     * 查询所有小院
     * @return
     */
    @Select("select id,name,location from cultural_yard")
    @Results(
        @Result(column = "location",property = "location",
                javaType = GeoPoint.class,typeHandler = GeoPointTypeHandler.class)
    )
    public List<Yard> selectAll();
}
